.container {
  min-height: 100vh;
  background-color: #f5f5f5;
  position: relative;
  padding-bottom: 80px;
}

.headerRight {
  position: absolute;
  top: 0;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 45px;
}

.headerIcon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333;
  cursor: pointer;
}

.content {
  padding: 16px;
}

.section {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sectionTitle {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.required {
  color: #ff4d4f;
  margin-left: 4px;
}

.infoRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.infoRow:last-child {
  border-bottom: none;
}

.infoLabel {
  font-size: 14px;
  color: #666;
}

.infoValue {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
}

.infoValue:hover {
  color: #1890ff;
}

.reasonContainer {
  position: relative;
}

.decorativeIcons {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  gap: 4px;
  z-index: 1;
}

.diamond {
  width: 6px;
  height: 6px;
  background: #87ceeb;
  transform: rotate(45deg);
  opacity: 0.7;
}

.reasonInput {
  width: 100%;
  min-height: 100px;
  padding: 12px 8px 30px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}

.reasonInput:focus {
  border-color: #1890ff;
}

.reasonInput::placeholder {
  color: #999;
  padding-left: 20px;
}

.charCount {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 12px;
  color: #999;
}

.drugList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emptyCart {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.emptyText {
  font-size: 16px;
  margin-bottom: 8px;
  color: #666;
}

.emptySubText {
  font-size: 14px;
  color: #999;
}

.drugItem {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}

.drugHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.drugTypeTag {
  background: #87ceeb;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.drugName {
  flex: 1;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.drugPrice {
  font-size: 14px;
  color: #ff4d4f;
  font-weight: 600;
}

.drugDetails {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drugQuantity {
  font-size: 12px;
  color: #666;
}

.drugTags {
  display: flex;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.prescriptionTag {
  background: #e6f7ff;
  color: #1890ff;
  border: 1px solid #91d5ff;
}

.limitTag {
  background: #fff2e8;
  color: #fa8c16;
  border: 1px solid #ffd591;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.confirmBtn {
  width: 100%;
  height: 44px;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.confirmBtn:hover:not(:disabled) {
  background: #40a9ff;
}

.confirmBtn:disabled {
  background: #d9d9d9;
  color: #999;
  cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .container {
    padding-bottom: 70px;
  }
  
  .content {
    padding: 12px;
  }
  
  .section {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .footer {
    padding: 12px;
  }
  
  .confirmBtn {
    height: 40px;
    font-size: 15px;
  }
  
  .modal {
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }
  
  .modalHeader {
    padding: 12px 16px;
  }
  
  .modalTitle {
    font-size: 15px;
  }
  
  .patientItem {
    padding: 14px 16px;
  }
  
  .modalFooter {
    padding: 12px 16px;
  }
  
  .addPatientBtn {
    height: 44px;
    font-size: 15px;
  }
}

/* 模态框样式 */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}

.modal {
  background: white;
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modalDragHandle {
  width: 40px;
  height: 4px;
  background: #d9d9d9;
  border-radius: 2px;
  margin: 8px auto;
  cursor: grab;
}

.modalDragHandle:active {
  cursor: grabbing;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.modalTitle {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.modalClose {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.modalClose:hover {
  background-color: #f5f5f5;
}

.patientList {
  max-height: 300px;
  overflow-y: auto;
}

.patientItem {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.patientItem:hover {
  background-color: #f8f9fa;
}

.patientItem:last-child {
  border-bottom: none;
}

.selectedPatient {
  background-color: #e6f7ff !important;
}

.patientName {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
}

.patientId {
  font-size: 12px;
  color: #999;
}

.modalFooter {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.addPatientBtn {
  width: 100%;
  height: 40px;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.addPatientBtn:hover {
  background: #40a9ff;
}
